package com.xps.charmingshop.date.servicrapi;


import com.xps.charmingshop.bean.ClassificationBean;
import com.xps.charmingshop.bean.ConductBean;
import com.xps.charmingshop.bean.LoginBean;
import com.xps.charmingshop.bean.RegisterBean;
import com.xps.charmingshop.bean.ShopBean;
import com.xps.charmingshop.bean.VerificationBean;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

public interface UserApi {


    /**
     * 注册接口
     *
     * @param shop_register_way     注册方式,1:Facebook;2:KAKAO;3:微信;4:邮箱
     * @param shop_email            邮箱
     * @param shop_name             店铺名称
     * @param shop_sort_id          店铺所属分类
     * @param shop_branch           店铺分店名称
     * @param shop_main             店铺主营
     * @param shop_pass1            密码1
     * @param shop_pass2            密码2
     * @param shop_tel              电话号码
     * @param shop_avatar           头像
     * @param shop_business_license 营业执照
     * @param shop_province         所在省份
     * @param shop_city             所在城市
     * @param shop_address          详细地址
     * @param shop_x                经度
     * @param shop_y                维度
     * @param sms_code              验证码
     * @return
     */
    @FormUrlEncoded
    @POST("shop_registered/index")
    Observable<RegisterBean> getRegister(@Field("shop_register_way") String shop_register_way, @Field("shop_avatar") String shop_avatar, @Field("shop_email") String shop_email, @Field("shop_name") String shop_name, @Field("shop_sort_id") String shop_sort_id, @Field("shop_branch") String shop_branch, @Field("shop_main") String shop_main, @Field("shop_pass1") String shop_pass1, @Field("shop_pass2") String shop_pass2, @Field("shop_tel") String shop_tel, @Field("sms_code") String sms_code, @Field("shop_business_license") String shop_business_license, @Field("shop_province") String shop_province, @Field("shop_city") String shop_city, @Field("shop_address") String shop_address, @Field("shop_x") String shop_x, @Field("shop_y") String shop_y);

    /**
     * 注册验证码接口
     *
     * @param shop_tel 手机号
     * @return
     */
    @FormUrlEncoded
    @POST("shop_registered/send_message")
    Observable<VerificationBean> getVerification(@Field("shop_tel") String shop_tel);

    /**
     * 注册验证码接口
     *
     * @param shop_email    邮箱
     * @param shop_password 密码
     * @return
     */
    @FormUrlEncoded
    @POST("shop_registered/shop_login")
    Observable<LoginBean> getLogin(@Field("shop_email") String shop_email, @Field("shop_password") String shop_password);

    /**
     * 订单列表接口
     *
     * @param shop_token 店铺token
     * @return
     */
    @FormUrlEncoded
    @POST("shop_order/order_list")
    Observable<ConductBean> getOrder(@Field("shop_token") String shop_token);

    /**
     * 店铺信息接口
     *
     * @param shop_token 店铺token
     * @return
     */
    @FormUrlEncoded
    @POST("shop/shop_info")
    Observable<ShopBean> getShop(@Field("shop_token") String shop_token);

    /**
     * 店铺信息接口
     *
     * @param shop_token 店铺token
     * @return
     */
    @FormUrlEncoded
    @POST("main_shop_list/cate_gory_list")
    Observable<ClassificationBean> getClassification(@Field("shop_token") String shop_token);


}
